package xg2013.totoro.domain;


import java.io.Serializable;
import java.util.Collection;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

/**
 * @generated
 */
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public abstract class Actor implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * @generated
	 */
	private String no;
	private String sex;
	private String name;
	/**
	 * @generated
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.TABLE)
	private Integer id;
	/**
	 * @generated
	 */
	@OneToOne
	@JoinColumn(name = "user_id")
	private User user;
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "poster",cascade = CascadeType.ALL)
	private Collection<Post> posts;
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "author")
	private Collection<StageAchievement> stageAchievements;
	/**
	 * @generated
	 */
	private String signPictureURL;

	/**
	 * @generated
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id 
	 * @generated
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @generated
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name 
	 * @generated
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @generated
	 */
	public String getSignPictureURL() {
		return signPictureURL;
	}

	/**
	 * @param signPictureURL 
	 * @generated
	 */
	public void setSignPictureURL(String signPictureURL) {
		this.signPictureURL = signPictureURL;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Collection<Post> getPosts() {
		return posts;
	}

	public void setPosts(Collection<Post> posts) {
		this.posts = posts;
	}

	public Collection<StageAchievement> getStageAchievements() {
		return stageAchievements;
	}

	public void setStageAchievements(Collection<StageAchievement> stageAchievements) {
		this.stageAchievements = stageAchievements;
	}
	
	
}